Next: Basic Types, Previous: Programming Example, Up: Top [Contents][Index]
Widgets are created with widget-create, which
returns a widget object. This object can be queried and
manipulated by other widget functions, until it is deleted with
widget-delete. After the widgets have been created,
widget-setup must be called to enable them.
Create and return a widget of type type. The syntax for the type argument is described in Basic Types.
The keyword arguments can be used to overwrite the keyword arguments that are part of type.
Delete widget and remove it from the buffer.
Set up a buffer to support widgets.
This should be called after creating all the widgets and before allowing the user to edit them.
If you want to insert text outside the widgets in the form,
the recommended way to do that is with
widget-insert.
Insert the arguments, either strings or characters, at point. The inserted text will be read-only.
There is a standard widget keymap which you might find useful.
TAB and C-TAB are bound to
widget-forward and widget-backward,
respectively. RET and mouse-2
are bound to widget-button-press and
widget-button-click.
Keymap used by widget-button-press and
widget-button-click when not on a button. By
default this is global-map.